package com.itheima.mybytestream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test2 {
    public static void main(String[] args) throws IOException {
        //进行数据的写入
        FileOutputStream fos = new FileOutputStream("myio\\a.txt");
        //定义字符串
        String arr1 = "jahfisjigjjg";
        byte[] bytes1 = arr1.getBytes();
        fos.write(bytes1);


        String arr2 = "\r\n";
        byte[] bytes2 = arr2.getBytes();
        fos.write(bytes2);

        String arr3 = "666";
        byte[] bytes3 = arr3.getBytes();
        fos.write(bytes3);
    }
}
